#!/bin/bash

# Updates all translation source files.

LUPDATE=lupdate
if ! which ${LUPDATE}; then
    echo "${LUPDATE} not found."
    exit 1
fi

for TS_FILE in src/translations/*.ts; do
    echo "Updating translation source ${TS_FILE}"
    ${LUPDATE} src/*.cpp src/dialogs/*.cpp src/io/*.cpp src/menus/*.cpp src/scene_items/*.cpp src/widgets/*.cpp -ts ${TS_FILE}
done

echo "Done."

